// @ts-ignore
/* eslint-disable */
import request from '@/utils/request.ts'

/** ai提供题目 ai提供题目，data返回的是json格式，content,difficulty,answer,analysis,1-单选,2-多选,3-填空,4-判断,5-简答 GET /question/${param0}/${param1} */
export async function question(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.questionParams,
  options?: { [key: string]: any }
) {
  const { type: param0, 'video-id': param1, ...queryParams } = params
  return request<API.BaseResponseObject>(`/question/${param0}/${param1}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  })
}

/** ai根据需求提供题目 GET /question/require/${param0}/${param1} */
export async function reQuestion(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.reQuestionParams,
  options?: { [key: string]: any }
) {
  const { require: param0, type: param1, ...queryParams } = params
  return request<API.BaseResponseObject>(`/question/require/${param0}/${param1}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  })
}
